home *** CD-ROM | disk | FTP | other *** search
-
- regc(2, "COMBINED_XFORM")
- regc(6, "MODEL_XFORM")
-
- regc(12, "FOG_PARAMS")
-
- regc(13, "CAMERA_POS_MS")
- regcn(14, "DIRECTIONAL_DIR_MS", 0)
-
- regc(20, "TEXTURE1_XFORM")
-
- // ------------ c40 - c60 reserved
- !include("vs_spot_consts.inc")
-
- vshader("
-
- #define point v0
- #define normal v1
- #define tangent v2
- #define tcoord v3
-
- #define fogp c12
- #define cpos c13
- #define ldir c14
-
- #include <fog.inc>
-
- vs_1_1
-
- dcl_position point
- dcl_normal normal
- dcl_tangent tangent
- dcl_texcoord tcoord
-
- ; output position
- m4x4 oPos, point, c2
- dp3 r4.x, normal, ldir ; diffuse N*L
-
- ; output diffuse
- mov oD0.w, r4.x // sun
-
- ;------------------------------------------
- // spot lights
- // used r0 - r2
- #if VS_SPOTLIGHTS
- #include <vs_spot_func.inc>
- #endif
- ;----------------------------
- ; output texcoords
- mov oT0, tcoord // broken
-
- ; terrain lightmap texgen (from model space)
- dp4 oT1.x, point, c20
- dp4 oT1.y, point, c21
-
- ; calc fog
- dp4 r0.x, point, c4
- FOG(r0.x, fogp, r10)
- ")
-
-